package com.ruoyi.back.domain

import com.baomidou.mybatisplus.annotation.*
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.springframework.format.annotation.DateTimeFormat
import java.util.*
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
import javax.persistence.Id
import javax.persistence.Table

@TableName("fly_app_version_info")
@ApiModel("app 版本管理")
@Entity
@Table(name = "fly_app_version_info")
data class AppVersionInfo(

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("id 更新的时候需要传递")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    var id: Long? = null,

    /**
     * 创建人
     */
    @ApiModelProperty(hidden = true)
    var createBy: Long? = 0L,

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(hidden = true)
    var createTime: Date? = null,

    /**
     * 更新人
     */
    @ApiModelProperty(hidden = true)
    var updateBy: Long? = 0L,

    /**
     * 更新时间
     */
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var updateTime: Date? = null,

    /**
     * 逻辑删除
     */
    @ApiModelProperty(hidden = true)
    @TableLogic
    var deleted: Int? = 0,

    @ApiModelProperty("版本号")
    var version: String? = null,

    @ApiModelProperty("安装包")
    var apk: String? = null,

    @ApiModelProperty("更新提醒")
    var updateRemind: Boolean? = null,

    @ApiModelProperty("版本描述")
    var versionDesc: String? = null,

    @ApiModelProperty("更新内容")
    var updateContent: String? = null,

    )
